package org.academic.texteditor.gui.form;

import java.awt.Container;
import java.awt.LayoutManager;

import javax.swing.JInternalFrame;

import org.academic.texteditor.helper.MessageHelper;

public abstract class AbstractInternalFrame extends JInternalFrame {

	private static final long serialVersionUID = 4525577674621806361L;

	protected static MessageHelper msg = MessageHelper.getInstance();
	
	protected Container content;
	
	protected AbstractInternalFrame(String title) {
		this(title, null);
	}
	
	protected AbstractInternalFrame(String title, LayoutManager layout) {
		setTitle(title);
		
		content = getContentPane();
		content.setLayout(layout);
		
		createInterface();
		
		setMaximizable(true);
		setIconifiable(true);
		setClosable(true);
		setVisible(true);
	}
	
	public void load() {
		
	}

	public void save() {
		
	}

	protected abstract void createInterface();

	
}
